# File：orm_test.py
# Author：信思智学
# Date ：2025/8/11 10:32
# Info：

import os
if __name__ == "__main__":
    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "DjangoORM20250807.settings")
    import django
    django.setup()
    from app.models import Book, Press, BookType
    from django.db.models import F,Q

    #select * from app_book where sale > kucun
    # booklist = Book.objects.filter(sale__gte=F("kucun"))
    # print(booklist)

    # id 1,3   range   in

    bookes = Book.objects.filter(Q(id__gte=3) | Q(id__lte=1))
    print(bookes)










